Portability Is Not Simple
Here's a portable program that produces a different result on each platform:
class ShowOS {
    public static void main(String[] args) {
        String os = System.getProperty("os.name");
        System.out.println(os);
    }
}
			

Return to Tracks

Previous | Next